using System;
using System.Collections.Generic;
using Web7.Core.Configuration;

namespace Web7.Core.BackgroundServices
{
    public interface IBackgroundServiceRegistry
    {
        void Clear();
        void Add<TExecutor, TService>(Web7AppConfigurationElement appConfiguration, string name, TimeSpan defaultInterval)
            where TExecutor : class, IBackgroundServiceExecutor
            where TService : IBackgroundService;
        IEnumerable<IBackgroundServiceExecutor> GetBackgroundServices();
    }
}
